package thread;

public class Demo8 {
    public static void main(String[] args) {
        Thread t1 = new Thread(()->{
            System.out.println("hello thraed1");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        },"thread1");
        t1.start();

        Thread t2 = new Thread(()->{
            System.out.println("hello thraed2");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        },"thread2");
        t2.start();
    }
}
